#include <iostream>
#include <fstream>
#include <string>

using namespace std;
/*
    fstream 
*/




int main(int argc, char *argv[])
{

    {
        std::ofstream outputFile("./output/output.txt");
        if (outputFile.is_open()) {
            outputFile << "This is some text.\n" << "This is some text.\n" << "This is some text.";
            outputFile.close();
        } else {
            std::cerr << "Unable to open file for writing." << std::endl;
        }
    }
    {
        std::ifstream inputFile("./output/output.txt");
        if (inputFile.is_open()) {
            string str;
            while(inputFile)
            {
                getline(inputFile,str);
                cout << str << endl;
            }
            
            inputFile.close();
        } else {
            std::cerr << "Unable to open file for writing." << std::endl;
        }
    }




    return 0;
}